package com.Wheesper.www.WheesperServer.Model;

public class User implements Comparable<User>{
	
	private final Integer _id;
	private String _password;
	private String _email;
	
	public User(Integer _id) {
		this._id = _id;
	}
	
	//Only getter 
	public Integer ID() {
		return _id;
	}
	
	//Password
	public String Password() {
		return _password;
	}
	public void Password(String password) {
		this._password = password;
	}
	
	//Email
	public String eMail()
	{
		return this._email;
	}
	
	public void eMail(String email) {
		this._email = email;
	}

	@Override
	public int compareTo(User other) {
		if(this._id > other._id)
			return 1;
		if(this._id == other._id)
			return 0;
		return -1;
	}

	@Override
	public String toString() {
		return "User\n["
				+ "ID:\t\t" + this._id + "\n"
				+ "EMail:\t\t" + this._email + "\n"
				+ "Password:\t" + this._password
				+ "]";
		
	}
}
